package jt.classic.app.clgl.jsy;

import jt.classic.system.ISystem;
import jt.classic.system.SimpleManager;
import jt.classic.system.group.GroupManager;
import jt.classic.system.group.IGroup;
import jt.classic.system.module.IMenu;
import jt.classic.system.module.IModule;
import jt.classic.system.module.impl.IMenuImpl;
import jt.classic.system.module.impl.IModuleImpl;
import jt.classic.system.role.IRole;
import jt.classic.system.role.RoleManager;
import jt.classic.system.user.IUser;
import jt.classic.system.user.impl.IUserImpl;

import org.limp.basework.SimpleBean;
import org.limp.basework.SimpleBeanProcessor;
import org.limp.basework.Table;
import org.limp.basework.analyzer.TableRegisterCenter;
import org.limp.basework.impl.SimpleBeanImpl;
import org.limp.basework.processor.SingleBeanProcessor;

import org.limp.mine.EncryptTool;

import java.sql.Connection;

import java.util.List;
import java.util.Map;


/**
 * 驾驶员管理者
 * @author zhuhj
 *
 */
public final class JsyManager extends SimpleManager {
    public JsyManager(Connection conn) {
        super(conn);
    }

    public JsyManager() {
        super();
    }

    /**
     * 根据驾驶员ID得到驾驶员实例
     *
     * @param id 驾驶员ID
     * @return 驾驶员内容
     */
    public Map getjsyById(String id) {
        String sql = "SELECT * FROM APP_JSY WHERE JSY_ID = " + id;

        Map info = this.trimmer.searchSingleData(sql);

        return info;
    }

    /**
     * 删除驾驶员信息
     *
     * @param ids 驾驶员ID
     */
    public void deleteS(String ids) {
        String[] str = ids.split(",");
        String sql = null;

        for (int i = 0; i < str.length; i++) {
            if (!str[i].equals("")) {
                sql = "DELETE FROM APP_JSY WHERE JSY_ID = " + str[i] ;
                   // ",DELETE FROM APP_H_HYSYD WHERE HYSYD_HYSID = " + str[i];

                this.trimmer.executeBatch(sql);
            }
        }
    }
}
